package com.sky.mapper;

import com.sky.annotation.AotuFillInsert;

import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetMealDishMapper {
    /**
     * 获取套餐里面被关联的菜品
     * @param ids
     * @return
     */
    List<Long> getMeal(List<Long> ids);

    /**
     * 添加套餐里面的菜单
     * @param setmealDishes
     */
  @AotuFillInsert
    void insertBatch(List<SetmealDish> setmealDishes);

    void DeleteSetMeal(List<Long> ids);

    @Select("select  * from sky_take_out.setmeal_dish where setmeal_id = #{id}")
    List<SetmealDish> getById(Long id);
@Delete("delete from sky_take_out.setmeal_dish where setmeal_id = #{setmealId}")
    void deleteSetMeal(Long setmealId);

    List<Long> select(Setmeal setmeal);
}

